﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExternalConnections.CCoECExternalConnectionsCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using EngineeringInternalExtension;
using System.Windows.Forms;
using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands.ExternalConnections;

public class CCoECExternalConnectionsCmd : ITxCommand, ITxExecutableCommand
{
  private ITxCommandEnabler m_enabler = (ITxCommandEnabler) new TxCommandEnabler(true);

  public ITxCommandEnabler CommandEnabler => this.m_enabler;

  public bool Connect() => true;

  public void Disconnect()
  {
  }

  public void Execute(object cmdParams)
  {
    bool flag = false;
    TxApplicationEx.ExternalConnectionsManager().BeginEdit();
    try
    {
      if (((Form) new CUiECExternalConnectionsForm()).ShowDialog() != DialogResult.OK)
        return;
      flag = true;
    }
    finally
    {
      TxApplicationEx.ExternalConnectionsManager().EndEdit(flag);
    }
  }

  public bool Expose => true;

  public string Identifier => "ExternalConnections.CCoECExternalConnectionsCmd";
}
